﻿using HK.Core.Common;
using HK.Core.Settings.Data;
using HK.Core.Settings.Protocol;
using UnityEngine;

namespace HK.Core.Settings
{
    /// <summary>
    /// 场景渲染设定
    /// </summary>
    [CreateAssetMenu(fileName = Const.SASSET_FILE_SCENE_RENDER_SETTINGS, menuName = Const.MENU_TXT_SCENE_RENDER_SETTINGS, order = (int)Const.ConstMenuPriority.SceneRenderSettings)]
    public class SceneRenderSettings : SListSettings<SceneRenderSettings, SceneRenderSettingsList, SceneRenderSettingsData>, ISceneRenderSettings<SceneRenderSettingsData>
    {
        /// <summary>
        /// 保护构造函数
        /// </summary>
        public SceneRenderSettings() : base(true) { }

        /// <summary>
        /// 保存设定
        /// </summary>
        /// <param name="iSettings">设定信息</param>
        /// <returns>true:OK; false:NG;</returns>
        public bool SaveSettings(SceneRenderSettingsData iSettings) => Body.SaveSettings(iSettings);

        /// <summary>
        /// 取得场景设定信息
        /// </summary>
        /// <param name="iSceneName">场景名</param>
        /// <returns>场景设定信息</returns>
        public SceneRenderSettingsData GetSettings(string iSceneName) => Body.GetSettings(iSceneName);
    }
}
